package defs

type UserCredential struct {
	Username string `json:"username"`
	Pwd      string `json:"pwd"`
}

// response
type SignedUp struct {
	Success   bool   `json:"success"`
	SessionId string `json:"session_id"`
}

type UserSession struct {
	Username string `json:"username"`
	SessionId string `json:"session_id"`
}

type UserInfo struct {
	Id int `json:"id"`
} 

type SignedIn struct {
	Success   bool   `json:"success"`
	SessionId string `json:"session_id"`
}


type VideosInfo struct {
	Videos []*VideoInfo `json:"videos"`
}

type Comments struct {
	Comments []*Comment `json:"comments"`
} 

type User struct {
	Id int `json:"id"`
	LoginName string `json:"login_name"`
	Pwd string `json:"pwd"`
}


// Data model
type VideoInfo struct {
	Id           string
	AuthorId     int
	Name         string
	DisplayCtime string
}

// Comment
type Comment struct {
	Id      string
	VideoId string
	Author  string
	Content string
}

// Session
type SimpleSession struct {
	Username string // login name
	TTL      int64
}
